// dlg.txt

//MK Edit
//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 39;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "You enter the ruins of what was once, in years forgotten, a mighty Ro city.";
	text2 = "Once, long, long before Haven came, this valley must have been far more fertile than it is now, and some enterprising Dhagans founded a mighty city here. Then it fell and was lost to history.";
	text3 = "Now it still has a role to play in the Low Dhaga: These walls are made of nice stone blocks. Scavengers are coming to mine the blocks and cart them off to the south.";
	text4 = "Even that work has temporarily come to a halt. Beasts from the desert have moved in and taken over the ruins. You can see their tracks and hear their snarls and hisses. If you can reclaim the ruins, someone in Etzae might be able to harvest stone for you.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "The center of this ruin was where they buried their honored dead. The tombstones are still here, but the centuries have worn them away.";
	text2 = "There is a large crypt in the middle of the courtyard. There are a few tools around, but stoneworkers haven't quite started seriously dismantling it yet.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "There are long crypts in the caves under the ruin. It's icy cold down here, which has kept the old offerings preserved for many, many years. There are a few tools and piles of brick scattered around. Scavengers came down here, but they didn't stay for long.";
	text2 = "As you enter the gallery, you hear moaning. Quiet at first, but slowly louder and angrier. Your invasion has awakened the dead, and they are angry.";
	code =
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "At the end of this gallery, you find the guardians of the crypt. They are two zombies, left to fight intruders.";
	text2 = "They aren't human zombies, though. They are drakes. Well, they were drakes. Then they were slain. Their gray dusty sides still bear the long, ragged scars. The lost magic of the Erudico brought them back.";
	text3 = "The old, withered creatures look back and forth with dry, milky-white eyes. They are waiting for prey to come, drawn by their treasure.";
	code =
		sf(this_town,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "This ceremonial hall was used by unknown people for rituals long forgotten. Forgotten loremasters would sit at this table and discuss pots of remains left on the eastern stone platforms. Maybe someday a Havenite sage will come and decipher the runes etched into the table. Seems unlikely, though.";
	text2 = "As you get close to the table, a draft blows through the hall. It picks up the dust and swirls around. Then the draft grows stronger, gathering up more and more dust. The two torches burst into bright flame.";
	text3 = "You immediately draw your weapon. When the dust coalesces into crude human forms, you are prepared.";
	code =
		sf(this_town,5,1);
		
		activate_hidden_group(11);
		set_terrain(1,32,17,607);
		set_terrain(1,32,24,607);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The doors into the crypt are held shut by several thick, horizontal iron bars. It would take some time to break into it. Someone else will have to come and help you.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "You have cleared out the ruins of this city. The beasts have been defeated. Now workers can return to collect stone. The question is how some of this stone can be used for your benefit.";
	text2 = "Perhaps someone back at Etzae can assist you in this endeavor.";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "The two drake sentinels have been destroyed. They fall apart and crumble into dust in front of you. The crypts have now been reclaimed for enthusiastic looting by the living.";


begintalknode; // 
	tag = 16;
	condition = 1;
	text1 = "Zmaray is in Etzae.";
	text2 = "We answer to Zmaray.";
	text3 = "(Pick! Pick!)";
	text4 = "Good stone here.";
	text5 = "It's safe for now.";
	text6 = "Thanks for the help.";
	text7 = "You can get stone.";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,7));
	break;
begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "This jar is full of dry, ground, orange clay. Part of your education was learning about everything that can be extracted from your vassals to enrich the Empire. You recognize this stuff as ochre, a valuable pigment.";
	text2 = "Unfortunately, this jar has been tainted with dirt and sand. It's not valuable enough to be worth your notice.";
	text3 = "It's beautiful stuff: Pure, powdery, and richly colored. Very pretty. You grab a leather pouch and take some of it with you.";
	text4 = "You've already poked at this jar. You reseal it.";
	code =
		cs();
		as(1);
		if (gf(39,16) == 0) {
			sf(39,16,1);
			inc_flag(32,14,1);
			if (gf(32,14) == 3) {
				as(3);
				set_spec_item(17,1);
				}
				else as(2);
			}
			else as(4);
	break;
	
begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				